package com.mt.enums;

/**
 * @author Wang
 * @Description 操作状态枚举
 * @date 2020/11/9-16:11
 */
public enum Status {

    SUCCESS(0,"操作成功"),
    ERROR(1,"操作失败"),
    DELETE_ERROR(1002,"删除失败"),
    PARAM_ERROR(1001,"参数错误"),
    AUTH_ERROR(401,"无此权限"),
    SYS_ERROR(-1,"系统错误,请联系管理员处理"),
    SEND_MSG_ERROR(3,"短信发送失败"),
    //user acl
    NOT_EXIST_ACL(1002,"此ACL不存在"),
    EXIST_ACL(1003,"ACL已存在"),
    EXIST_ACL_NAME(1004,"已存在ACL名称"),
    EXIST_ACL_CODE(1005,"已存在ACL标识"),
    EXIST_ACL_PATH(1006,"请求路径已存在"),
    EXIST_ROLE(1007,"角色已存在"),
    LOGIN_ERROR(2001,"登录失败,请检查用户名/密码是否正确"),
    EXIST_USER(2002,"手机号已被注册"),
    PASSWORD_ERROR(2003,"密码错误"),
    //电影服务
    FILM_INFO_ERROR(5001,"电影信息查询异常"),
    NOT_EXIST_FILM(5002,"电影不存在"),
    EXIST_COMMENT(5004,"您已评论"),
    ORDER_NOT_TO_COMMENT(5003,"无法评论"),

    //电影院服务
    EXIST_CINEMA(2001,"电影院已存在"),
    NOT_EXIST_CINEMA(2002,"电影院不存在"),
    //电影厅
    EXIST_CINEMA_HALL(2101,"电影厅已存在"),
    //座位
    SEAT_LIST_EMPTY(2111,"选择的座位不可为空"),
    //电影场次
    SCHDULE_HAVE_CONFLICT(2201,"电影场次存在冲突"),
    NOT_EXIST_SCHDULE(2202,"不存在当前场次"),
    SCHEDULE_EXPIRED(2203,"当前场次已经过期"),
    //电影票 or 订单
    TICKET_HAD_SOLD(3001,"当前座位已出售"),
    TICKET_LOCK_ERROR(3002,"{}座位已售"),
    CREATE_ORDER_ERROR(3003,"订单创建失败,请重试"),
    ORDER_NOT_EXIST(3004,"订单不存在"),
    //文件
    FILE_IS_NULL_ERROR(5000,"上传文件为空"),
    UPLOAD_ERROR(5001,"文件上传失败")
    ;

    private Integer code;

    private String msg;

    Status(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }


}
